package model

import (
	"fmt"
	"time"
)

type BusinessHours struct{
	BusinessHoursId int64 `xorm:"pk autoincr"`
	WorkTime string
	LineType int
	BusinessHoursState int
	CreatedAt time.Time
	UpdatedAt time.Time
}

func (bh *BusinessHours)QueryBusinessHours() bool{
	var bhv []*BusinessHours
	x.Where("line_type = ?", 1).And("work_time = ?", time.Now().Format("2006-01-02")).And("business_hours_state = ?", 1).Find(&bhv)

	fmt.Println(len(bhv))
	if len(bhv) > 0{
		return true
	}
	return false
}
